import Relay from "react-relay";

export default class PublishOrderMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { publishOrder }`;
    }

    getVariables() {
        return {
            argsInput: {
                orderId:this.props.orderId,
                partBs:this.props.partBs,
                enquiryId: this.props.enquiryId
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on publishOrderPayload {
            publishOrder {
                errorCode
                order{
                    oid
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
               fragment on publishOrderPayload {
            publishOrder {
                errorCode
                order{
                    oid
                }
                }
             }
            `]
        }];
    }

}
